# GnuMake  matrixssl 3.1.1

CC		= dmc
LIBR		= lib
CFLAG	=  -I. -Iinclude -Isrc -Isrc/ares -Isrc/ares/config_win32 -c \
	-DWIN32=1 \
	-DPSPUBLIC="" \
	-DUSE_MULTITHREADING=1 \
	-DUSE_CLIENT_SIDE_SSL=1 \
	-D_USRDLL=0 \
	-DUSE_CORE_TRACE=1 \
	-DWINAPI=1 \
	-DSTRICT \
	-DMSDMC -DCARES_STATICLIB -DCARES_SYMBOL_HIDING -DWIN32 \
	-DHAVE_STRUCT_SOCKADDR_STORAGE=0 -DHAVE_AF_INET6=0 \
	-DWT_EXECUTEINWAITTHREAD=0x00000004 -DWT_EXECUTELONGFUNCTION=0x00000010 -DFILE_FLAG_FIRST_PIPE_INSTANCE=0x00080000 -DINVALID_FILE_ATTRIBUTES=-1 \
	-DFILE_ATTRIBUTE_REPARSE_POINT=1024 -DWT_EXECUTEONLYONCE=0x00000008 -DWT_EXECUTEDEFAULT=0x00000000
# -DUSE_FILE_SYSTEM=1  -DHAVE_WINSOCK2_H -D_WIN32_WINNT=0x0400 

UV_LIB		= uv.lib
ALL_OBJ		= $(patsubst %.c, %.obj, $(wildcard src/*.c src/*/*.c))

ALL: $(UV_LIB)

%.obj: %.c
	$(CC) $(CFLAG)  $^ -o$@

$(UV_LIB) : $(ALL_OBJ)
	$(LIBR) -c $@ $^

clean:
	del /S /Q *.obj *.def *.map
